home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / gtksourceview-2.0 / language-specs / nsis.lang < prev    next >
Extensible Markup Language  |  2009-10-02  |  3KB  |  88 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Yevgen Muntyan <muntyan@tamu.edu>
  5.  Copyright (C) 2008 Yevgen Muntyan
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="nsis" _name="NSIS" version="2.0" _section="Others">
  24.   <metadata>
  25.     <property name="globs">*.nsi;*.nsh</property>
  26.     <property name="line-comment-start">;</property>
  27.   </metadata>
  28.  
  29.   <styles>
  30.     <style id="operator" _name="Operator" map-to="def:operator"/>
  31.     <style id="comment" _name="Comment" map-to="def:comment"/>
  32.     <style id="string" _name="String" map-to="def:string"/>
  33.     <style id="variable" _name="Variable" map-to="makefile:variable"/>
  34.   </styles>
  35.  
  36.   <definitions>
  37.  
  38.     <context id="operator" style-ref="operator">
  39.       <prefix>!</prefix>
  40.       <keyword>define</keyword>
  41.       <keyword>include</keyword>
  42.       <keyword>insertmacro</keyword>
  43.       <keyword>ifdef</keyword>
  44.       <keyword>endif</keyword>
  45.     </context>
  46.  
  47.     <define-regex id="identifier">[\w_][\w\d_]*</define-regex>
  48.  
  49.     <context id="variable" style-ref="variable">
  50.       <match>\$(\%{identifier}|\{\%{identifier}\}|\(\^\%{identifier}\))</match>
  51.     </context>
  52.  
  53.     <context id="variable-assignment">
  54.       <match>^\s*(!define)\s+(\%{identifier})</match>
  55.       <include>
  56.         <context sub-pattern="1" style-ref="operator"/>
  57.         <context sub-pattern="2" style-ref="variable"/>
  58.       </include>
  59.     </context>
  60.  
  61.     <context id="string" style-ref="string">
  62.       <start>"</start>
  63.       <end>"</end>
  64.       <include>
  65.     <context ref="variable"/>
  66.       </include>
  67.     </context>
  68.  
  69.     <context id="comment" style-ref="comment" end-at-line-end="true">
  70.       <start>;</start>
  71.       <include>
  72.         <context ref="def:in-comment"/>
  73.       </include>
  74.     </context>
  75.  
  76.     <context id="nsis">
  77.       <include>
  78.         <context ref="operator"/>
  79.         <context ref="variable"/>
  80.         <context ref="variable-assignment"/>
  81.         <context ref="comment"/>
  82.         <context ref="string"/>
  83.       </include>
  84.     </context>
  85.  
  86.   </definitions>
  87. </language>
  88.